program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var fin: textfile;
 var n,i: integer;
 var z,v,s,a: real;
 x: array of integer;
 y: array of integer;
 xa: array of integer;
 ya: array of integer;

 begin




  z:=0;
  v:=0;
  s:=0;
  a:=0;
  assignfile(fin,'input1.txt');
  reset(fin);

  read(fin,m);
  setlength(xa,m);
  setlength(ya,m);
  for i := 0 to m-1 do
    begin
     read(fin,xa[i],ya[i]);
    end;
  for i:=0 to m-1 do
     begin
      z:=z+xa[i]/m;
      v:=v+ya[i]/m;
     end;
  read(fin,n);
  setlength(x,n);
  setlength(y,n);
  for i := 0 to n-1 do
    begin
     read(fin,x[i],y[i]);


    end;
  for i := 0 to n-1 do
    s:=s+(z*(y[i]-y[i+1])+x[i]*(y[i+1]-v)+x[i+1]*(v-y[i]))/2;
  for i := 0 to n-1 do
    begin
     a:=a+(x[i]*y[i+1] - y[i]*x[i+1]);
     a:=abs(a/2);
    end;
     if s>a then
       write('no')
     else
      write('yes');
  readln;
end.

end.
